package com.xj.demo.unknow;

public class ScalarReplaceTest {
    static class User{
        private String name;
        private int age;
    }

    public static void replaceBefore(){
        User user = new User();
        user.name = "xj";
        user.age = 18;
        System.out.println(user.name+" "+user.age);
    }
    public static void replaceAfter(){
        String name = "xj";
        int age = 18;
        System.out.println(name+" "+age);
    }

}
